package com.pcbly.web.components.utils.template.dwr.dao;

import com.pcbly.web.bean.news.NewsBean;
import com.pcbly.web.components.utils.template.AbstractModel;

public class ModelCommonDao {
	@SuppressWarnings("unchecked")
	public void execute(Class clz){
		AbstractModel model=new ModelDao(clz);
		model.setTableName(tableName);
		model.execute();
		
		model=new ModelDaoXml(clz);
		model.setTableName(tableName);
		model.execute();
		
		
		model=new ModelDaoImp(clz);
		model.setTableName(tableName);
		model.execute();
		
	}
	private String tableName;
	
	
	
	public String getTableName() {
		return tableName;
	}



	public void setTableName(String tableName) {
		this.tableName = tableName;
	}



	public static void main(String[] args) {
		ModelCommonDao model=new ModelCommonDao();
		model.setTableName("t_news");
		model.execute(NewsBean.class);
	}
}
